package com.tradesolver;

import java.util.Date;

import javax.persistence.Id;

import com.google.appengine.repackaged.com.google.common.base.Objects;
import com.googlecode.objectify.annotation.Indexed;
import com.googlecode.objectify.annotation.Unindexed;

public class StockUpdate {
  @Id
  String stamp;
  @Unindexed
  Date insertDate;
  @Indexed
  String stampDate;
  @Unindexed
  String data;

  private StockUpdate() {
  }

  public StockUpdate(String stamp, String data) {
    super();
    this.stamp = stamp;
    this.data = data;
    this.stampDate = stamp.substring(0, 8);
  }

  @Override
  public String toString() {
    return Objects.toStringHelper(this).add("stamp", stamp).add("data", data).toString();
  }
}
